//6：1、2、4、9个数字，能组成多少个互不相同且无重复数字的三位数？都是多少？ 
package ZUOYE0424;

public class Task6 {

	public static void main(String[] args) {
		int[] num = { 1, 2, 4, 9 };
		int d = 0;
		for (int a = 0; a < num.length; a++) {
			for (int b = 0; b < num.length; b++) {
				if (num[a] == num[b])
					continue;
				for (int c = 0; c < num.length; c++) {
					if (num[c] == num[a] || num[c] == num[b])
						continue;
					System.out.println(num[a] + "" + num[b] + "" + num[c]);
					d++;
				}
			}
		}
		System.out.println("一共有" + d + "种情况");
	}

}
